from Node import Node


class LinkList:
    def __init__(self):
        self.head = Node(None)

    def init_list(self, list1):
        p = self.head
        for item in list1:
            p.next = Node(item)
            p = p.next

    def print(self):
        p = self.head
        while p.next is not None:
            print(p.next.val, end='')
            p = p.next


if __name__ == "__main__":
    list01 = LinkList()
    list01.init_list([1, 2, 3, 4])
    list01.print()
